import os
import google_play_scraper as google_play_scraper
import json

# 获取应用信息
result = google_play_scraper.app(
    'com.gytz.mabilis',
    lang='en', # defaults to 'en'
    country='ph', # defaults to 'us'
)

print(result)

# 将result结果保存在当前绝对目录下example.json中
file_path_name1 = './example.json'
current_path = os.path.dirname(__file__)
file_path_name1 = file_path_name1.replace("./", current_path + "/")

with open(file_path_name1, 'w', encoding='utf-8') as f:
    json.dump(result, f, ensure_ascii=False, indent=4)
